﻿<UserControl x:Class="PrintScreens.SilverlightControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Height="1123.2" Width="797.8">
    <!--Size based on size of a sheet of A4-->
    <UserControl.Resources>
        <ResourceDictionary Source="Styles.xaml"/>
    </UserControl.Resources>
    <!--Printers don't usually print right to the edge-->
    <Grid Margin="30">
        <StackPanel>
            <TextBlock Margin="5" Style="{StaticResource PageHeading}">Shepperton Slalom Renewal Documents for:</TextBlock>

            <Grid Margin="5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="2*"/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Column="0" Style="{StaticResource ColumnHeading}">Name</TextBlock>
                <TextBlock Grid.Column="1" Style="{StaticResource ColumnHeading}">Address</TextBlock>
                <TextBlock Grid.Column="2" Style="{StaticResource ColumnHeading}">Home Tel</TextBlock>
                <TextBlock Grid.Column="3" Style="{StaticResource ColumnHeading}">Email</TextBlock>
                <Line Grid.ColumnSpan="4" X1="0" X2="1" Stretch="Fill" VerticalAlignment="Bottom"/>
                <Border Grid.RowSpan="2" Grid.ColumnSpan="4"/>

                <ItemsControl Grid.Row="1" Grid.ColumnSpan="4" ItemsSource="{Binding Members}" Margin="0">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition Width="2*"/>
                                    <ColumnDefinition/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" Text="{Binding FullName}" Style="{StaticResource Field}"/>
                                <TextBlock Grid.Column="1" Text="{Binding Address}" Style="{StaticResource Field}"/>
                                <TextBlock Grid.Column="2" Text="{Binding HomeTelephone}" Style="{StaticResource Field}"/>
                                <TextBlock Grid.Column="3" Text="{Binding Email}" Style="{StaticResource Field}"/>
                            </Grid>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </Grid>
         
            <Grid Margin="5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="20*"/>
                    <ColumnDefinition Width="10*"/>
                    <ColumnDefinition Width="10*"/>
                    <ColumnDefinition Width="10*"/>
                    <ColumnDefinition Width="10*"/>
                    <ColumnDefinition Width="15*"/>
                    <ColumnDefinition Width="10*"/>
                    <ColumnDefinition Width="15*"/>
                    <ColumnDefinition Width="10*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Column="2" Grid.ColumnSpan="4" Style="{StaticResource ColumnHeading}">Costs</TextBlock>
                <TextBlock Grid.Column="6" Grid.ColumnSpan="3" Style="{StaticResource ColumnHeading}">Documents Required</TextBlock>

                <TextBlock Grid.Row="1" Style="{StaticResource ColumnHeading}">Member Name</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource ColumnHeading}">Type</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource ColumnHeading}">Rate</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="3" Style="{StaticResource ColumnHeading}">BCU</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="4" Style="{StaticResource ColumnHeading}">Racks</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="5" Style="{StaticResource ColumnHeading}">Total</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="6" Style="{StaticResource ColumnHeading}">Copy of BCU Card</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="7" Style="{StaticResource ColumnHeading}">Student Union Card/Proof of Unemployment</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="8" Style="{StaticResource ColumnHeading}">Parental Consent Form</TextBlock>

                <Line  X1="1" Stretch="Fill" VerticalAlignment="Bottom" Grid.ColumnSpan="10"/>
                <Line Grid.Row="1"  X1="1" Stretch="Fill" VerticalAlignment="Bottom" Grid.ColumnSpan="10"/>
                <Line Grid.Column="1"  Y1="1" Stretch="Fill" HorizontalAlignment="Right" Grid.RowSpan="3"/>
                <Line Grid.Column="5"  Y1="1" Stretch="Fill" HorizontalAlignment="Right" Grid.RowSpan="3"/>
                <ItemsControl Grid.ColumnSpan="10" Grid.Row="2" ItemsSource="{Binding Path=Members}" Margin="-5,0">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="20*"/>
                                    <ColumnDefinition Width="10*"/>
                                    <ColumnDefinition Width="10*"/>
                                    <ColumnDefinition Width="10*"/>
                                    <ColumnDefinition Width="10*"/>
                                    <ColumnDefinition Width="15*"/>
                                    <ColumnDefinition Width="10*"/>
                                    <ColumnDefinition Width="15*"/>
                                    <ColumnDefinition Width="10*"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="{Binding Path=FullName}" Style="{StaticResource Field}"/>
                                <TextBlock Grid.Column="1" Text="{Binding Path=MembershipType}"  Style="{StaticResource Field}"/>
                                <TextBlock Grid.Column="2" Text="{Binding Path=Rate, StringFormat=\{0:c\}}"  Style="{StaticResource Field}"/>
                                <TextBlock Grid.Column="3" Text="{Binding Path=BCU, StringFormat=\{0:c\}}" Style="{StaticResource Field}" />
                                <TextBlock Grid.Column="4" Text="{Binding Path=Racks, StringFormat=\{0:c\}}" Style="{StaticResource Field}" />
                                <TextBlock Grid.Column="5" Text="{Binding Path=Total, StringFormat=\{0:c\}}" Style="{StaticResource Field}" />
                                <CheckBox Grid.Column="6" IsChecked="{Binding Path=rqBCUCard}" />
                                <CheckBox Grid.Column="7" IsChecked="{Binding Path=rqConcessionProof}" />
                                <CheckBox Grid.Column="8" IsChecked="{Binding Path=ParentalConsent}" />
                            </Grid>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
                <Border Grid.RowSpan="3" Grid.ColumnSpan="10" />
                <Border Grid.Row="3" Grid.Column="5">
                    <TextBlock Text="{Binding TotalMoney, StringFormat=\{0:c\}}" FontSize="12" Style="{StaticResource Field}" />
                </Border>
            </Grid>
            
            <TextBlock Style="{StaticResource BodyText}" Margin="5">
                <Run>Shepperton Slalom Canoe Club will take care is taken to ensure your safety during Club activities.  However,</Run>
                <Run FontWeight="Bold">Canoeing and Kayaking are ‘assumed risk’ – ‘water contact sports’ that may carry attendant risks. Participants should be aware of and understand these risks, and be responsible for their own actions and involvement.</Run>
                <Run>Public Liability is covered by our Affiliation to the British Canoe Union.  Details of Public Liability insurance cover is given on</Run>
                <Run TextDecorations="Underline">www.bcu.org.uk</Run>
            </TextBlock>
            <ItemsControl ItemTemplate="{StaticResource LegalStatement}" ItemsSource="{Binding MembersConsent}">
            </ItemsControl>
        </StackPanel>
    </Grid>
</UserControl>
